<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>WebSocket send message</title>
    <script type="text/javascript" src="js/index.js"></script>
    <script type="text/javascript">

        function pushMsg() {
            var empCode = $("empCode");

            AjaxUtil.request({
                url: "push",
                params: {
                    "user": empCode.value
                },
                type: "text",
                callback: function (text) {
                    console.log(text);
                }
            });
        }

        function $(id) {
            return document.getElementById(id);
        }


    </script>
</head>
<body>
<div align="right" style="width: 100%; height: 50px">
    <div align="center" style="width: 100%; height: 50px">
        <form method="get">
            <table>
                <tbody>
                <tr>
                    <td>推送工号：<input id="empCode" name="user" type="text" value="357070" /></td>
                    <td>
                        <button type="button" onclick="pushMsg()" value="">推送(LOCAL)</button>
                    </td>
                </tr>
                </tbody>
            </table>
        </form>
    </div>
</div>
</body>
</html>  